package biz.microplus.information.bean;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Map;

/**
 * 信息数据模型
 */
@Entity
public class InformationBean extends BaseBean {

    // 待审核
    public static final String STATUS_REVIEW_NONE = "0";
    // 审核通过
    public static final String STATUS_REVIEW_PASS = "1";
    // 驳回
    public static final String STATUS_REVIEW_REJECT = "2";

    // 草稿
    public static final String STATUS_DRAFT = "0";
    // 已发布
    public static final String STATUS_PUBLISHED = "1";
    // 已下架
    public static final String STATUS_DISABLED = "2";
    // 违规删除
    public static final String STATUS_VIOLATION = "3";

    /**
     * 标识
     */
    @Id
    private int id;
    /**
     * 标题
     */
    private String title;
    /**
     * 缩略图
     */
    private String thumbnail;
    /**
     * 发布人ID
     */
    private int parentId;
    /**
     * 操作人ID
     */
    private int userId;
    /**
     * 企业ID
     */
    private int enterpriseId;
    /**
     * 钢厂名称
     */
    private String enterpriseName;
    /**
     * 类目ID
     * 1  闲置信息
     * 2 竞价信息
     * 3 成套设备信息
     */
    private int categoryId;
    /**
     * 类目名称
     */
    private String categoryName;
    /**
     * 物质类型
     * 1 闲置物资
     * 2 闲置设备
     * 3 厂房产线
     * 4 备品备件
     */
    private int typeId;
    /**
     * 物质名称
     */
    private String typeName;
    /**
     * 招标形式
     * 1 线上竞标
     * 2  线下竞标
     * 3 第三方平台竞标
     */
    private int biddingId;
    /**
     * 招标形式名称
     */
    private String biddingName;

    /**
     * 招标状态
     * 1 招标中
     * 2 已结束
     * 3 已暂停
     */
    private int biddingState;
    /**
     * 招标状态描述
     */
    private String biddingStateDec;

    /**
     * 国家ID
     */
    private int countryId;
    /**
     * 省份ID
     */
    private int provinceId;
    /**
     * 城市ID
     */
    private int cityId;
    /**
     * 区县ID
     */
    private int countyId;
    /**
     * 街道ID
     */
    private int streetId;
    /**
     * 地址
     */
    private String address;
    /**
     * 消息内容
     */
    private String body;
    /**
     * 价格参数
     */
    private String price;
    /**
     * 消息状态
     */
    private String status;
    /**
     * 消息审核状态
     */
    private String reviewStatus;

    /**
     * 浏览量
     */
    private int pageView;
    /**
     * 收藏量
     */
    private int collection;
    /**
     * 项目名称
     */
    private String projectName;
    /**
     * 项目编号
     */
    private String projectCode;

    /**
     * 物质名称
     */
    private String substanceName;
    /**
     * 标的总价(预估)
     */
    private String totalPrices;
    /**
     * 附件
     */
    private String fileUrl;
    /**
     * 排序
     */
    private int sort;
    /**
     * 删除时间戳
     */
    private int deletedAt;
    /**
     * 招标开始时间戳
     */
    private int BeginAt;
    /**
     * 招标结束时间戳
     */
    private int endAt;
    /**
     * 发布时间戳
     */
    private int publishedAt;
    /**
     * 到期时间戳
     */
    private int expireAt;
    /**
     * 创建时间戳
     */
    private int createdAt;
    /**
     * 更新时间戳
     */
    private int updatedAt;
    /**
     * 刷新时间戳
     */
    private int refreshAt;

    /**
     * 处置方式
     * 1 整体打包
     * 2 分类处置
     */
    private int methodsId;
    /**
     * 处置方式 名称
     */
    private String methodsDec;

    /**
     * 竞买人要求
     * 1 企业竞买人
     * 2 个人竞买人
     * 3不限
     */
    private int askId;
    /**
     * 竞买人要求 描述
     */
    private String askDec;

    /**
     * 其他要求
     */
    private String askOther;

    /**
     * 冶金工程施工资质要求
     * 1 冶金工程施工总承包特级资质
     * 2 冶金工程施工总承包一级资质
     * 3 冶金工程施工总承包二级资质
     * 4 冶金工程施工总承包三级资质
     */
    private int metallurgyId;

    /**
     * 冶金工程施工资质要求 描述
     */
    private String metallurgyDec;

    /**
     * 建筑工程施工资质要求
     * 1 建筑工程施工总承包特级资质
     * 2 建筑工程施工总承包一级资质
     * 3 建筑工程施工总承包二级资质
     * 4 建筑工程施工总承包三级资质
     */
    private int buildId;

    /**
     * 建筑工程施工资质要求 描述
     */
    private String buildDec;

    /**
     * 企业安全资质要求
     * 1 有
     * 2 无
     */
    private int surenessId;
    /**
     * 企业安全资质要求 描述
     */
    private String surenessDec;


    /**
     * 以下字段用于后台查询条件，没有实际意义
     */

    private int memberParentId;
    private BigDecimal levelAmount;
    /**
     * 页面查询条件  标的总价(预估)
     * 1000000 100万(含)以下
     * 5000000 500万(含)以下
     * 10000000 1000万(含)以下
     * 50000000 5000万(含)以下
     * 50000001 5000万(含)以上
     */
    private BigDecimal p_totalPrices;

    /**
     * 页面查询条件  招标期限
     * 1 1天内
     * 3 3天内
     * 7 7天内
     * 30 30天内
     * 90 90天内
     */
    private int p_time;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(int enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public int getCountryId() {
        return countryId;
    }

    public void setCountryId(int countryId) {
        this.countryId = countryId;
    }

    public int getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(int provinceId) {
        this.provinceId = provinceId;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public int getCountyId() {
        return countyId;
    }

    public void setCountyId(int countyId) {
        this.countyId = countyId;
    }

    public int getStreetId() {
        return streetId;
    }

    public void setStreetId(int streetId) {
        this.streetId = streetId;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getStatus() {
        return status;
    }

    public String getReviewStatus() {
        return reviewStatus;
    }

    public void setReviewStatus(String reviewStatus) {
        this.reviewStatus = reviewStatus;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public int getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(int deletedAt) {
        this.deletedAt = deletedAt;
    }

    public int getPublishedAt() {
        return publishedAt;
    }

    public void setPublishedAt(int publishedAt) {
        this.publishedAt = publishedAt;
    }

    public int getExpireAt() {
        return expireAt;
    }

    public void setExpireAt(int expireAt) {
        this.expireAt = expireAt;
    }

    public int getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(int createdAt) {
        this.createdAt = createdAt;
    }

    public int getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(int updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getPageView() {
        return pageView;
    }

    public void setPageView(int pageView) {
        this.pageView = pageView;
    }

    public int getCollection() {
        return collection;
    }

    public void setCollection(int collection) {
        this.collection = collection;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getSubstanceName() {
        return substanceName;
    }

    public void setSubstanceName(String substanceName) {
        this.substanceName = substanceName;
    }

    public String getTotalPrices() {
        return totalPrices;
    }

    public void setTotalPrices(String totalPrices) {
        this.totalPrices = totalPrices;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public int getBeginAt() {
        return BeginAt;
    }

    public void setBeginAt(int beginAt) {
        BeginAt = beginAt;
    }

    public int getEndAt() {
        return endAt;
    }

    public void setEndAt(int endAt) {
        this.endAt = endAt;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }


    public int getBiddingId() {
        return biddingId;
    }

    public void setBiddingId(int biddingId) {
        this.biddingId = biddingId;
    }

    public String getCategoryName() {
        if (this.getCategoryId() == 1) {
            categoryName = "闲置信息";
        } else if (this.getCategoryId() == 2) {
            categoryName = "竞价信息";
        } else if (this.getCategoryId() == 3) {
            categoryName = "成套设备信息";
        }
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getTypeName() {
        if (this.getCategoryId() == 1) {
            typeName = "闲置物资";
        } else if (this.getCategoryId() == 2) {
            typeName = "闲置设备";
        } else if (this.getCategoryId() == 3) {
            typeName = "厂房产线";
        } else if (this.getCategoryId() == 4) {
            typeName = "备品备件";
        }
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getBiddingName() {
        if (this.getCategoryId() == 1) {
            biddingName = "线上竞标";
        } else if (this.getCategoryId() == 2) {
            biddingName = "线下竞标";
        } else if (this.getCategoryId() == 3) {
            biddingName = "第三方平台竞标";
        }
        return biddingName;
    }

    public int getMemberParentId() {
        return memberParentId;
    }

    public void setMemberParentId(int memberParentId) {
        this.memberParentId = memberParentId;
    }

    public BigDecimal getLevelAmount() {
        return levelAmount;
    }

    public void setLevelAmount(BigDecimal levelAmount) {
        this.levelAmount = levelAmount;
    }

    public void setBiddingName(String biddingName) {
        this.biddingName = biddingName;
    }

    public int getRefreshAt() {
        return refreshAt;
    }

    public void setRefreshAt(int refreshAt) {
        this.refreshAt = refreshAt;
    }

    public BigDecimal getP_totalPrices() {
        return p_totalPrices;
    }

    public void setP_totalPrices(BigDecimal p_totalPrices) {
        this.p_totalPrices = p_totalPrices;
    }

    public int getP_time() {
        return p_time;
    }

    public void setP_time(int p_time) {
        this.p_time = p_time;
    }

    public int getMethodsId() {
        return methodsId;
    }

    public void setMethodsId(int methodsId) {
        this.methodsId = methodsId;
    }

    public String getMethodsDec() {
        if (this.getMethodsId() == 1) {
            methodsDec = "整体打包";
        } else if (this.getMethodsId() == 2) {
            methodsDec = "分类处置";
        }
        return methodsDec;
    }

    public void setMethodsDec(String methodsDec) {
        this.methodsDec = methodsDec;
    }

    public int getAskId() {
        return askId;
    }

    public void setAskId(int askId) {
        this.askId = askId;
    }

    public String getAskDec() {
        if (this.getAskId() == 1) {
            askDec = "企业竞买人";
        } else if (this.getAskId() == 2) {
            askDec = "个人竞买人";
        } else if (this.getAskId() == 3) {
            askDec = "不限";
        }
        return askDec;
    }

    public void setAskDec(String askDec) {
        this.askDec = askDec;
    }

    public String getAskOther() {
        return askOther;
    }

    public void setAskOther(String askOther) {
        this.askOther = askOther;
    }

    public int getMetallurgyId() {
        return metallurgyId;
    }

    public void setMetallurgyId(int metallurgyId) {
        this.metallurgyId = metallurgyId;
    }

    public String getMetallurgyDec() {
        if (this.getMetallurgyId() == 1) {
            metallurgyDec = "冶金工程施工总承包特级资质";
        } else if (this.getMetallurgyId() == 2) {
            metallurgyDec = "冶金工程施工总承包一级资质";
        } else if (this.getMetallurgyId() == 3) {
            metallurgyDec = "冶金工程施工总承包二级资质";
        } else if (this.getMetallurgyId() == 3) {
            metallurgyDec = "冶金工程施工总承包三级资质";
        }
        return metallurgyDec;
    }

    public void setMetallurgyDec(String metallurgyDec) {
        this.metallurgyDec = metallurgyDec;
    }

    public int getBuildId() {
        return buildId;
    }

    public void setBuildId(int buildId) {
        this.buildId = buildId;
    }

    public String getBuildDec() {
        if (this.buildId == 1) {
            buildDec = "建筑工程施工总承包特级资质";
        } else if (this.buildId == 2) {
            buildDec = "建筑工程施工总承包一级资质";
        } else if (this.buildId == 3) {
            buildDec = "建筑工程施工总承包二级资质";
        } else if (this.buildId == 4) {
            buildDec = "建筑工程施工总承包三级资质";
        }
        return buildDec;
    }

    public void setBuildDec(String buildDec) {
        this.buildDec = buildDec;
    }

    public int getSurenessId() {
        return surenessId;
    }

    public void setSurenessId(int surenessId) {
        this.surenessId = surenessId;
    }

    public String getSurenessDec() {
        if (this.getSurenessId() == 1) {
            surenessDec = "有";
        } else if (this.getSurenessId() == 2) {
            surenessDec = "无";
        }
        return surenessDec;
    }

    public int getBiddingState() {
        return biddingState;
    }

    public void setBiddingState(int biddingState) {
        this.biddingState = biddingState;
    }

    public String getBiddingStateDec() {
        if (this.getBiddingState() == 1) {
            biddingStateDec = "招标中";
        } else if (this.getBiddingState() == 2) {
            biddingStateDec = "已结束";
        } else if (this.getBiddingState() == 3) {
            biddingStateDec = "已暂停";
        }
        return biddingStateDec;
    }

    public void setBiddingStateDec(String biddingStateDec) {
        this.biddingStateDec = biddingStateDec;
    }

    public void setSurenessDec(String surenessDec) {
        this.surenessDec = surenessDec;
    }
}